3.20.47 \(\int \frac {(d+e x)^2}{\sqrt {a d e+(c d^2+a e^2) x+c d e x^2}} \, dx\) [1947]

Optimal. Leaf size=195 \[ \frac {3 \left (c d^2-a e^2\right ) \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{4 c^2 d^2}+\frac {(d+e x) \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{2 c d}+\frac {3 \left (c d^2-a e^2\right )^2 \tanh ^{-1}\left (\frac {c d^2+a e^2+2 c d e x}{2 \sqrt {c} \sqrt {d} \sqrt {e} \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}\right )}{8 c^{5/2} d^{5/2} \sqrt {e}} \]

[Out]

3/8*(-a*e^2+c*d^2)^2*arctanh(1/2*(2*c*d*e*x+a*e^2+c*d^2)/c^(1/2)/d^(1/2)/e^(1/2)/(a*d*e+(a*e^2+c*d^2)*x+c*d*e*
x^2)^(1/2))/c^(5/2)/d^(5/2)/e^(1/2)+3/4*(-a*e^2+c*d^2)*(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1/2)/c^2/d^2+1/2*(e*
x+d)*(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1/2)/c/d

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 195, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.108, Rules used = {684, 654, 635, 212} \begin {gather*} \frac {3 \left (c d^2-a e^2\right )^2 \tanh ^{-1}\left (\frac {a e^2+c d^2+2 c d e x}{2 \sqrt {c} \sqrt {d} \sqrt {e} \sqrt {x \left (a e^2+c d^2\right )+a d e+c d e x^2}}\right )}{8 c^{5/2} d^{5/2} \sqrt {e}}+\frac {3 \left (c d^2-a e^2\right ) \sqrt {x \left (a e^2+c d^2\right )+a d e+c d e x^2}}{4 c^2 d^2}+\frac {(d+e x) \sqrt {x \left (a e^2+c d^2\right )+a d e+c d e x^2}}{2 c d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^2/Sqrt[a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2],x]

[Out]

(3*(c*d^2 - a*e^2)*Sqrt[a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2])/(4*c^2*d^2) + ((d + e*x)*Sqrt[a*d*e + (c*d^2 +
 a*e^2)*x + c*d*e*x^2])/(2*c*d) + (3*(c*d^2 - a*e^2)^2*ArcTanh[(c*d^2 + a*e^2 + 2*c*d*e*x)/(2*Sqrt[c]*Sqrt[d]*
Sqrt[e]*Sqrt[a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2])])/(8*c^(5/2)*d^(5/2)*Sqrt[e])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 635

Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(4*c - x^2), x], x, (b + 2*c*x)
/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 654

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*((a + b*x + c*x^2)^(p +
 1)/(2*c*(p + 1))), x] + Dist[(2*c*d - b*e)/(2*c), Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}
, x] && NeQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rule 684

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*(d + e*x)^(m - 1)*
((a + b*x + c*x^2)^(p + 1)/(c*(m + 2*p + 1))), x] + Dist[(m + p)*((2*c*d - b*e)/(c*(m + 2*p + 1))), Int[(d + e
*x)^(m - 1)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 -
b*d*e + a*e^2, 0] && GtQ[m, 1] && NeQ[m + 2*p + 1, 0] && IntegerQ[2*p]

Rubi steps

\begin {align*} \int \frac {(d+e x)^2}{\sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}} \, dx &=\frac {(d+e x) \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{2 c d}+\frac {\left (3 \left (d^2-\frac {a e^2}{c}\right )\right ) \int \frac {d+e x}{\sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}} \, dx}{4 d}\\ &=\frac {3 \left (c d^2-a e^2\right ) \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{4 c^2 d^2}+\frac {(d+e x) \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{2 c d}+\frac {\left (3 \left (d^2-\frac {a e^2}{c}\right )^2\right ) \int \frac {1}{\sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}} \, dx}{8 d^2}\\ &=\frac {3 \left (c d^2-a e^2\right ) \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{4 c^2 d^2}+\frac {(d+e x) \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{2 c d}+\frac {\left (3 \left (d^2-\frac {a e^2}{c}\right )^2\right ) \text {Subst}\left (\int \frac {1}{4 c d e-x^2} \, dx,x,\frac {c d^2+a e^2+2 c d e x}{\sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}\right )}{4 d^2}\\ &=\frac {3 \left (c d^2-a e^2\right ) \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{4 c^2 d^2}+\frac {(d+e x) \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{2 c d}+\frac {3 \left (c d^2-a e^2\right )^2 \tanh ^{-1}\left (\frac {c d^2+a e^2+2 c d e x}{2 \sqrt {c} \sqrt {d} \sqrt {e} \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}\right )}{8 c^{5/2} d^{5/2} \sqrt {e}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.26, size = 160, normalized size = 0.82 \begin {gather*} \frac {\sqrt {c} \sqrt {d} \sqrt {e} (a e+c d x) (d+e x) \left (-3 a e^2+c d (5 d+2 e x)\right )+3 \left (c d^2-a e^2\right )^2 \sqrt {a e+c d x} \sqrt {d+e x} \tanh ^{-1}\left (\frac {\sqrt {e} \sqrt {a e+c d x}}{\sqrt {c} \sqrt {d} \sqrt {d+e x}}\right )}{4 c^{5/2} d^{5/2} \sqrt {e} \sqrt {(a e+c d x) (d+e x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^2/Sqrt[a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2],x]

[Out]

(Sqrt[c]*Sqrt[d]*Sqrt[e]*(a*e + c*d*x)*(d + e*x)*(-3*a*e^2 + c*d*(5*d + 2*e*x)) + 3*(c*d^2 - a*e^2)^2*Sqrt[a*e
 + c*d*x]*Sqrt[d + e*x]*ArcTanh[(Sqrt[e]*Sqrt[a*e + c*d*x])/(Sqrt[c]*Sqrt[d]*Sqrt[d + e*x])])/(4*c^(5/2)*d^(5/
2)*Sqrt[e]*Sqrt[(a*e + c*d*x)*(d + e*x)])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(441\) vs. \(2(169)=338\).
time = 0.73, size = 442, normalized size = 2.27

method result size
default \(e^{2} \left (\frac {x \sqrt {a d e +\left (e^{2} a +c \,d^{2}\right ) x +c d e \,x^{2}}}{2 c d e}-\frac {3 \left (e^{2} a +c \,d^{2}\right ) \left (\frac {\sqrt {a d e +\left (e^{2} a +c \,d^{2}\right ) x +c d e \,x^{2}}}{c d e}-\frac {\left (e^{2} a +c \,d^{2}\right ) \ln \left (\frac {\frac {1}{2} e^{2} a +\frac {1}{2} c \,d^{2}+c d e x}{\sqrt {c d e}}+\sqrt {a d e +\left (e^{2} a +c \,d^{2}\right ) x +c d e \,x^{2}}\right )}{2 c d e \sqrt {c d e}}\right )}{4 c d e}-\frac {a \ln \left (\frac {\frac {1}{2} e^{2} a +\frac {1}{2} c \,d^{2}+c d e x}{\sqrt {c d e}}+\sqrt {a d e +\left (e^{2} a +c \,d^{2}\right ) x +c d e \,x^{2}}\right )}{2 c \sqrt {c d e}}\right )+2 d e \left (\frac {\sqrt {a d e +\left (e^{2} a +c \,d^{2}\right ) x +c d e \,x^{2}}}{c d e}-\frac {\left (e^{2} a +c \,d^{2}\right ) \ln \left (\frac {\frac {1}{2} e^{2} a +\frac {1}{2} c \,d^{2}+c d e x}{\sqrt {c d e}}+\sqrt {a d e +\left (e^{2} a +c \,d^{2}\right ) x +c d e \,x^{2}}\right )}{2 c d e \sqrt {c d e}}\right )+\frac {d^{2} \ln \left (\frac {\frac {1}{2} e^{2} a +\frac {1}{2} c \,d^{2}+c d e x}{\sqrt {c d e}}+\sqrt {a d e +\left (e^{2} a +c \,d^{2}\right ) x +c d e \,x^{2}}\right )}{\sqrt {c d e}}\) \(442\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2/(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

e^2*(1/2*x/c/d/e*(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1/2)-3/4*(a*e^2+c*d^2)/c/d/e*(1/c/d/e*(a*d*e+(a*e^2+c*d^2)
*x+c*d*e*x^2)^(1/2)-1/2*(a*e^2+c*d^2)/c/d/e*ln((1/2*e^2*a+1/2*c*d^2+c*d*e*x)/(c*d*e)^(1/2)+(a*d*e+(a*e^2+c*d^2
)*x+c*d*e*x^2)^(1/2))/(c*d*e)^(1/2))-1/2*a/c*ln((1/2*e^2*a+1/2*c*d^2+c*d*e*x)/(c*d*e)^(1/2)+(a*d*e+(a*e^2+c*d^
2)*x+c*d*e*x^2)^(1/2))/(c*d*e)^(1/2))+2*d*e*(1/c/d/e*(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1/2)-1/2*(a*e^2+c*d^2)
/c/d/e*ln((1/2*e^2*a+1/2*c*d^2+c*d*e*x)/(c*d*e)^(1/2)+(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1/2))/(c*d*e)^(1/2))+
d^2*ln((1/2*e^2*a+1/2*c*d^2+c*d*e*x)/(c*d*e)^(1/2)+(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1/2))/(c*d*e)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2/(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(c*d^2-%e^2*a>0)', see `assume?
` for more d

________________________________________________________________________________________

Fricas [A]
time = 1.97, size = 409, normalized size = 2.10 \begin {gather*} \left [\frac {{\left (3 \, {\left (c^{2} d^{4} - 2 \, a c d^{2} e^{2} + a^{2} e^{4}\right )} \sqrt {c d} e^{\frac {1}{2}} \log \left (8 \, c^{2} d^{3} x e + c^{2} d^{4} + 8 \, a c d x e^{3} + a^{2} e^{4} + 4 \, \sqrt {c d^{2} x + a x e^{2} + {\left (c d x^{2} + a d\right )} e} {\left (2 \, c d x e + c d^{2} + a e^{2}\right )} \sqrt {c d} e^{\frac {1}{2}} + 2 \, {\left (4 \, c^{2} d^{2} x^{2} + 3 \, a c d^{2}\right )} e^{2}\right ) + 4 \, {\left (2 \, c^{2} d^{2} x e^{2} + 5 \, c^{2} d^{3} e - 3 \, a c d e^{3}\right )} \sqrt {c d^{2} x + a x e^{2} + {\left (c d x^{2} + a d\right )} e}\right )} e^{\left (-1\right )}}{16 \, c^{3} d^{3}}, -\frac {{\left (3 \, {\left (c^{2} d^{4} - 2 \, a c d^{2} e^{2} + a^{2} e^{4}\right )} \sqrt {-c d e} \arctan \left (\frac {\sqrt {c d^{2} x + a x e^{2} + {\left (c d x^{2} + a d\right )} e} {\left (2 \, c d x e + c d^{2} + a e^{2}\right )} \sqrt {-c d e}}{2 \, {\left (c^{2} d^{3} x e + a c d x e^{3} + {\left (c^{2} d^{2} x^{2} + a c d^{2}\right )} e^{2}\right )}}\right ) - 2 \, {\left (2 \, c^{2} d^{2} x e^{2} + 5 \, c^{2} d^{3} e - 3 \, a c d e^{3}\right )} \sqrt {c d^{2} x + a x e^{2} + {\left (c d x^{2} + a d\right )} e}\right )} e^{\left (-1\right )}}{8 \, c^{3} d^{3}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2/(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1/2),x, algorithm="fricas")

[Out]

[1/16*(3*(c^2*d^4 - 2*a*c*d^2*e^2 + a^2*e^4)*sqrt(c*d)*e^(1/2)*log(8*c^2*d^3*x*e + c^2*d^4 + 8*a*c*d*x*e^3 + a
^2*e^4 + 4*sqrt(c*d^2*x + a*x*e^2 + (c*d*x^2 + a*d)*e)*(2*c*d*x*e + c*d^2 + a*e^2)*sqrt(c*d)*e^(1/2) + 2*(4*c^
2*d^2*x^2 + 3*a*c*d^2)*e^2) + 4*(2*c^2*d^2*x*e^2 + 5*c^2*d^3*e - 3*a*c*d*e^3)*sqrt(c*d^2*x + a*x*e^2 + (c*d*x^
2 + a*d)*e))*e^(-1)/(c^3*d^3), -1/8*(3*(c^2*d^4 - 2*a*c*d^2*e^2 + a^2*e^4)*sqrt(-c*d*e)*arctan(1/2*sqrt(c*d^2*
x + a*x*e^2 + (c*d*x^2 + a*d)*e)*(2*c*d*x*e + c*d^2 + a*e^2)*sqrt(-c*d*e)/(c^2*d^3*x*e + a*c*d*x*e^3 + (c^2*d^
2*x^2 + a*c*d^2)*e^2)) - 2*(2*c^2*d^2*x*e^2 + 5*c^2*d^3*e - 3*a*c*d*e^3)*sqrt(c*d^2*x + a*x*e^2 + (c*d*x^2 + a
*d)*e))*e^(-1)/(c^3*d^3)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (d + e x\right )^{2}}{\sqrt {\left (d + e x\right ) \left (a e + c d x\right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2/(a*d*e+(a*e**2+c*d**2)*x+c*d*e*x**2)**(1/2),x)

[Out]

Integral((d + e*x)**2/sqrt((d + e*x)*(a*e + c*d*x)), x)

________________________________________________________________________________________

Giac [A]
time = 0.81, size = 174, normalized size = 0.89 \begin {gather*} \frac {1}{4} \, \sqrt {c d x^{2} e + c d^{2} x + a x e^{2} + a d e} {\left (\frac {2 \, x e}{c d} + \frac {{\left (5 \, c d^{2} e - 3 \, a e^{3}\right )} e^{\left (-1\right )}}{c^{2} d^{2}}\right )} - \frac {3 \, {\left (c^{2} d^{4} - 2 \, a c d^{2} e^{2} + a^{2} e^{4}\right )} \sqrt {c d} e^{\left (-\frac {1}{2}\right )} \log \left ({\left | -\sqrt {c d} c d^{2} e^{\frac {1}{2}} - 2 \, {\left (\sqrt {c d} x e^{\frac {1}{2}} - \sqrt {c d x^{2} e + c d^{2} x + a x e^{2} + a d e}\right )} c d e - \sqrt {c d} a e^{\frac {5}{2}} \right |}\right )}{8 \, c^{3} d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2/(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1/2),x, algorithm="giac")

[Out]

1/4*sqrt(c*d*x^2*e + c*d^2*x + a*x*e^2 + a*d*e)*(2*x*e/(c*d) + (5*c*d^2*e - 3*a*e^3)*e^(-1)/(c^2*d^2)) - 3/8*(
c^2*d^4 - 2*a*c*d^2*e^2 + a^2*e^4)*sqrt(c*d)*e^(-1/2)*log(abs(-sqrt(c*d)*c*d^2*e^(1/2) - 2*(sqrt(c*d)*x*e^(1/2
) - sqrt(c*d*x^2*e + c*d^2*x + a*x*e^2 + a*d*e))*c*d*e - sqrt(c*d)*a*e^(5/2)))/(c^3*d^3)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (d+e\,x\right )}^2}{\sqrt {c\,d\,e\,x^2+\left (c\,d^2+a\,e^2\right )\,x+a\,d\,e}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e*x)^2/(x*(a*e^2 + c*d^2) + a*d*e + c*d*e*x^2)^(1/2),x)

[Out]

int((d + e*x)^2/(x*(a*e^2 + c*d^2) + a*d*e + c*d*e*x^2)^(1/2), x)

________________________________________________________________________________________